#ifndef Thread_h__
#define Thread_h__

class CSimpleThread
{
public:
	CSimpleThread(void);
	virtual ~CSimpleThread(void);

	inline BOOL IsRunning(void);

	void Stop(void);

	virtual BOOL Update(void) = 0;

	virtual void OnTerminate(void) = 0;

protected:
	BOOL _Begin(void);

	static unsigned int __stdcall _ThreadFunc(void* param);

private:
	HANDLE m_hThread;
	BOOL m_bRunning;

};

inline BOOL CSimpleThread::IsRunning(void)
{
	return m_bRunning;
}

#endif // Thread_h__
